<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <!--适应移动端-->
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>标签</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <link rel="stylesheet" href="../static/css/me.css">
</head>
<body>
<!--导航-->
<nav th:replace="_fragments :: nav(3)" class="ui inverted attached segment m-padded-tb-mini m-opacity-mini fly">
    <div class="ui container">
        <div class="ui inverted secondary stackable menu">
            <h2 class="ui teal header item">Swim's Blog</h2>
            <a href="#" class="item m-mobile-hide m-item"><i class="home icon"></i>首页</a>
            <a href="#" class="item m-mobile-hide m-item"><i class="idea icon"></i>分类</a>
            <a href="#" class="item m-mobile-hide m-item"><i class="tags icon"></i>标签</a>
            <a href="#" class="item m-mobile-hide m-item"><i class="clone icon"></i>归档</a>
            <a href="#" class="item m-mobile-hide m-item"><i class="info icon"></i>关于我</a>

            <div class="right m-item item m-mobile-hide ">
                <div class="ui icon inverted transparent input">
                    <input type="text" title="" placeholder="Search for something">
                    <i class="search link icon"></i>
                </div>
            </div>
        </div>
    </div>
    <a href="#" class="ui menu toggle  black icon button m-top-right m-mobile-show">
        <i class="sidebar icon"></i>
    </a>

</nav>

<!--中间内容部分-->
<div class="m-container-small m-padded-tb-large">
    <div class="ui container">
        <div class="ui top attached segment ">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <h3 class="ui teal header">标签</h3>
                </div>
                <div class="right aligned column">
                    共 <h3 class="ui  orange header m-inline-block" th:text="${#arrays.length(tags)}">14</h3> 篇
                </div>
            </div>
        </div>

        <!--标签-->
        <div class="ui attached segment">
            <a href="#" th:href="@{/tags/{id}(id=${tag.id})}"
               th:classappend="${tag.id == activeTagId} ? 'blue'" class="ui  basic left  label m-margin-tb-tiny"
               th:each="tag : ${tags}">
                <span th:text="${tag.name}">嘻嘻嘻</span>
                <div class="detail" th:text="${#arrays.length(tag.blogs)}">12</div>
            </a>

        </div>

        <!--文章-->
        <div class="ui attached olive segment">
            <div class="ui padded vertical segment m-padded-tb-large" th:each="blog : ${page.content}">
                <div class="ui middle aligned mobile reversed stackable grid">
                    <div class="eleven wide column">
                        <h3 class="ui header"><a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank"
                                                 class="m-black" th:text="${blog.title}">what's that?</a></h3>
                        <p class="m-text" th:text="|${blog.description}......|">&nbsp;&nbsp;&nbsp;&nbsp;人在身处逆境时，适应环境的能力实在惊人。人可以忍受不幸，也可以战胜不幸，因为人有着惊人的潜力，只要立志发挥它，就一定能渡过难关。——卡耐基</p>
                        <div class="ui grid">
                            <div class="row">
                                <div class="eleven wide column">
                                    <div class="ui link list horizontal mini">
                                        <div class="item">
                                            <img src="https://unsplash.it/100/100?image=1005"
                                                 th:src="@{${blog.user.avatar}}"
                                                 class="ui avatar image" alt="">
                                            <div class="content">
                                                <a href="#" class="header" th:text="${blog.user.nickname}">RYX</a>
                                            </div>
                                        </div>
                                        <div class="item">
                                            <i class="calendar icon"></i> <span
                                                th:text="${#dates.format(blog.updateTime,'yyyy-MM-dd')}">2020-06-21</span>
                                        </div>

                                        <div class="item">
                                            <i class="eye icon"></i> <span th:text="${blog.views}">123</span>
                                        </div>

                                    </div>
                                </div>
                                <div class="right aligned five wide column">
                                    <a href="#" class="ui label teal basic " target="_blank"
                                       th:text="${blog.type.name}">
                                        up level
                                    </a>
                                </div>
                            </div>
                            <div class="row ">
                                <div class="column">
                                    <a href="#" th:href="@{/tags/{id}(id=${tag.id})}" class="ui basic  left pointing label" th:classappend="${tag.id==activeTagId} ? 'blue' : 'red'"  th:each="tag : ${blog.tags}" th:text="${tag.name}">嘻嘻嘻</a>
                                </div>

                            </div>


                        </div>
                    </div>

                    <div class="five wide column">
                        <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                            <img src="https://unsplash.it/800/450?image=1005" th:src="@{${blog.firstPicture}}"
                                 class="ui rounded image" alt="">
                        </a>
                    </div>
                </div>
            </div>
        </div>

        <div class="ui bottom attached segment" th:if="${page.totalPages}>1">
            <div class="ui middle aligned two column grid">
                <div class="column">
                    <a href="#" th:href="@{/(page=${page.number}-1)}" th:unless="${page.first}"
                       class="ui orange basic mini button">上一页</a>
                </div>
                <div class="right aligned column">
                    <a href="#" th:href="@{/(page=${page.number}+1)}" th:unless="${page.last}"
                       class="ui orange basic mini button">下一页</a>
                </div>
            </div>
        </div>

    </div>


</div>


<!--底部-->
<footer th:replace="_fragments :: footer" class="ui inverted segment vertical m-padded-tb-massive">
    <div class="ui container center aligned">
        <div class="ui  inverted stackable divided grid">
            <div class="three wide column">
                <img src="../static/img/Qr.jpg" class="ui rounded image" style="width: 110px;">
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header">最新blog</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item ">My story </a>
                    <a href="#" class="item ">My story </a>
                    <a href="#" class="item ">My story </a>
                </div>
            </div>
            <div class="three wide column">
                <h4 class="ui inverted header">最新blog</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item ">My story </a>
                    <a href="#" class="item ">My story </a>
                    <a href="#" class="item ">My story </a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header">最新blog</h4>
                <p class="m-text-spaced m-opacity-mini">只要学不死，就往死里学，加油，噢利给！！！</p>
            </div>

        </div>
        <div class="ui inverted section divider"></div>
        <p class="m-text-thin m-text-spaced m-opacity-mini ">Copyright@2020-2021 Swim's Blog Designed by RYX</p>

    </div>
</footer>

<th:block th:replace="_fragments :: script">
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
</th:block>

<script src="../static/js/snow.js" th:src="@{/js/snow.js}"></script>

<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });


</script>

</body>
<script>

</script>
</html>